pick-git-annex-build: sort runs ourselves, log the listing, allow pinning - #16
Merged
Merged
Conversation
…ning In eval-under run 36491628696 (push to master, 22:18 UTC) the picker took con/git-annex run 35319817132 (2026-09-18, no OsPath) as the newest schedule/workflow_dispatch master run with a package, although at 19:58 and 21:13 the same code picked 36399800528 (2026-09-28). The OsPath check in install-git-annex-daily.sh rejected the build, so every git-annex cell ended "incomplete". The loop logs each matching candidate, and only the 09-18 run was logged: the API either listed it above the newer runs or did not list them at all. We cannot tell which from that log. - One runs query per event (`&event=...`), so filtering is server-side and $GIT_ANNEX_BUILD_SCAN covers more history; the pages are merged and sorted by created_at here instead of trusting the API's (undocumented) order. Fixes the mis-ordered case. - Log, per event, how many runs were listed and the newest one, so a stale listing is distinguishable from a mis-ordered one next time. - ::warning:: (stderr, so the `$(...)` capture in install-git-annex-daily.sh stays clean) when the pick is older than GIT_ANNEX_BUILD_MAX_AGE days (default 3; the build is daily). Not fatal: the OsPath check already fails the cell. - test.yaml: workflow_dispatch input `git-annex-run`, passed to the picker as GIT_ANNEX_RUN_ID, to pin a known build (e.g. 36399800528) while the listing misbehaves. A pinned run is still checked for a package artifact. Tested: bin/ci/run-checks.sh (shellcheck 26 scripts, known-issues, unit tests); the picker against a stub gh for a mis-ordered listing (now picks 36399800528), an old-only listing (warns), a pinned run, and a pinned run without a package (fails). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0112v9r8Yrb9zytWDMmC9dZ2
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
In run 36491628696 (the push that merged #15), every git-annex cell ended up incomplete. The picker chose con/git-annex run 35319817132 from 2026-09-18, which has no OsPath build.
install-git-annex-daily.shthen rejected it withlacks expected build flag(s): OsPath, so the suite never ran.The same picker code chose different runs within a few hours:
The picker logs every run of a matching event type, and in the failed run it logged only the 09-18 one. So either the API listed that run above the newer ones, or the newer ones weren't in its answer at all. That log can't tell the two apart.
What
&event=schedule,&event=workflow_dispatch), so the API does the filtering and the 30 runs per query reach further back. The results are merged and sorted bycreated_atin the script; the API's order isn't documented. This fixes the case where the runs came back in the wrong order.::warning::when the chosen run is more thanGIT_ANNEX_BUILD_MAX_AGEdays old (default 3; the build runs daily). It's written to stderr so it doesn't end up in the$(...)capture ininstall-git-annex-daily.sh. It doesn't fail the job, because the OsPath check already does that.git-annex-runinput forworkflow_dispatchintest.yaml, passed to the picker asGIT_ANNEX_RUN_ID. It lets you pin a known build, e.g. 36399800528. The pinned run is still checked for a package artifact.Limits
continue-on-error, so the cells then fall back to picking a build themselves.Testing
bin/ci/run-checks.shpasses: shellcheck on 26 scripts, known-issues validation, unit tests.gh:🤖 Generated with Claude Code
https://claude.ai/code/session_0112v9r8Yrb9zytWDMmC9dZ2
Generated by Claude Code